﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VISS.API.Users;

namespace VISS.Web.Frontend.Modules.User.Profile {
    public partial class FormSearchRightControl : System.Web.UI.UserControl {

        public bool UseDefaultSearchCondition = true;
        public EUserGender Gender = EUserGender.Unknown;
        public short CityID { get; set; }
        public short JobID { get; set; }
        public int FromAge { get; set; }
        public int ToAge { get; set; }

        protected void Page_Load(object sender, EventArgs e) {
            if (UseDefaultSearchCondition) {
                UserContext userContext = LoginFactory.GetCurrentUser();
                if (userContext != null)
                {
                    switch (userContext.LookingFor)
                    {
                        case EUserLookingFor.Male:
                            Gender = EUserGender.Male;
                            break;
                        case EUserLookingFor.Female:
                            Gender = EUserGender.Female;
                            break;
                        default:
                            Gender = EUserGender.Unknown;
                            break;
                    }
                }
            }
        }
    }
}